import request from '@/utils/request'

export default {
    getnewslist(pageIndex,pageSize) {
        return request({
          url: '/api/news/news/listall',
          method: 'get',
          params: ({
            'page': pageIndex,
            'limit': pageSize
          })
        })
      },
    getnewsbyId(id){
      return request({
        url:`/api/news/news/info/${id}`,
        method: 'get'
      })
    },
    addlook(id){
      return request({
          url:`/api/news/news/addlook/${id}`,
          method:'get',
      })   
  },
  addlooknum(id,num){
    return request({
      url:`/api/news/news/addlooknum/${id}/${num}`,
      method:'get',
  })
  },

  addsupport(supportinfo){
    return request({
      url:`/api/news/news/addsupport`,
      method:'post',
      data:supportinfo
  })
  },
  delsupport(supportinfo){
    return request({
      url:`/api/news/news/delsupport`,
      method:'post',
      data:supportinfo
  })
  },

  supportor(supportinfo){
    return request({
      url:`/api/news/news/supportor`,
      method:'post',
      data:supportinfo
  })
  },
  updatesupportsum(newsId){
    return request({
      url:`/api/news/news/updatesupportsum/${newsId}`,
      method:'post',
  })
  }
}